package p270jp.pxv.android.viewholder;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.databinding.DataBindingUtil;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import p014ae.View$OnClickListenerC0151s;
import p165fo.C3114c;
import p216hn.DefaultConstructorMarker;
import p270jp.pxv.android.R;
import p270jp.pxv.android.event.OpenRankingLogDialogEvent;
import p314lg.ViewRankingSpinnerItemBinding;
import p325m0.MutabilityOwnership;
import p370ni.RankingCategory;
import p521th.SolidItemViewHolder;

/* compiled from: RankingLogDateSpinnerViewHolder.kt */
/* renamed from: jp.pxv.android.viewholder.RankingLogDateSpinnerViewHolder */
/* loaded from: classes2.dex */
public final class RankingLogDateSpinnerViewHolder extends SolidItemViewHolder {
    private final ViewRankingSpinnerItemBinding binding;
    private final Date date;
    private final RankingCategory rankingCategory;
    public static final Companion Companion = new Companion(null);
    public static final int $stable = 8;

    /* compiled from: RankingLogDateSpinnerViewHolder.kt */
    /* renamed from: jp.pxv.android.viewholder.RankingLogDateSpinnerViewHolder$Companion */
    /* loaded from: classes2.dex */
    public static final class Companion {
        private Companion() {
        }

        public /* synthetic */ Companion(DefaultConstructorMarker eVar) {
            this();
        }

        public final RankingLogDateSpinnerViewHolder createViewHolder(ViewGroup viewGroup, RankingCategory cVar, Date date) {
            MutabilityOwnership.m3745m(viewGroup, "parent");
            MutabilityOwnership.m3745m(cVar, "rankingCategory");
            MutabilityOwnership.m3745m(date, "date");
            ViewRankingSpinnerItemBinding dbVar = (ViewRankingSpinnerItemBinding) DataBindingUtil.m11370c(LayoutInflater.from(viewGroup.getContext()), R.layout.view_ranking_spinner_item, viewGroup, false);
            MutabilityOwnership.m3746l(dbVar, "binding");
            return new RankingLogDateSpinnerViewHolder(dbVar, cVar, date);
        }
    }

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public RankingLogDateSpinnerViewHolder(ViewRankingSpinnerItemBinding dbVar, RankingCategory cVar, Date date) {
        super(dbVar.f2666e);
        MutabilityOwnership.m3745m(dbVar, "binding");
        MutabilityOwnership.m3745m(cVar, "rankingCategory");
        MutabilityOwnership.m3745m(date, "date");
        this.binding = dbVar;
        this.rankingCategory = cVar;
        this.date = date;
    }

    /* renamed from: a */
    public static /* synthetic */ void m4399a(RankingLogDateSpinnerViewHolder rankingLogDateSpinnerViewHolder, View view) {
        m12331onBindViewHolder$lambda0(rankingLogDateSpinnerViewHolder, view);
    }

    /* renamed from: onBindViewHolder$lambda-0 */
    public static final void m12331onBindViewHolder$lambda0(RankingLogDateSpinnerViewHolder rankingLogDateSpinnerViewHolder, View view) {
        MutabilityOwnership.m3745m(rankingLogDateSpinnerViewHolder, "this$0");
        C3114c.m6284b().m6280f(new OpenRankingLogDialogEvent(rankingLogDateSpinnerViewHolder.rankingCategory, rankingLogDateSpinnerViewHolder.date));
    }

    @Override // p521th.SolidItemViewHolder
    public void onBindViewHolder(int i) {
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat(this.itemView.getContext().getString(R.string.ranking_log_title_date), Locale.US);
        String string = this.itemView.getContext().getString(this.rankingCategory.f23753b);
        MutabilityOwnership.m3746l(string, "itemView.context.getStri…nkingCategory.titleResId)");
        this.binding.f21446q.setText(MutabilityOwnership.m3739s(simpleDateFormat.format(this.date), this.itemView.getContext().getString(R.string.ranking_log_title_mode, string)));
        this.itemView.setOnClickListener(new View$OnClickListenerC0151s(this, 28));
    }
}
